package com.example.xlzx.controller;

import com.example.xlzx.entity.vo.LoginUserVo;
import com.example.xlzx.entity.vo.LoginVo;
import com.example.xlzx.result.Result;
import com.example.xlzx.service.IUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "登录接口")
@RestController
@RequestMapping("/xlzx")
public class LoginContoller {
    @Autowired
    private IUserService iUserService;
    @Operation(summary = "登录")
    @PostMapping("/login")
    public Result<LoginUserVo> login(@RequestBody LoginVo loginVo) {
        return Result.ok(iUserService.login(loginVo));
    }


}
